#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<stdio.h>

typedef struct Student {
	char* ID;
	char* name;
	size_t age;
	size_t Math;
	size_t English;
	size_t CL;
	size_t Engineer;
	size_t Phy;
	size_t Inf;
}Stu;

void StuInit(Stu* ps) {
	ps->ID = (char*)malloc(20 * sizeof(char));
	ps->name = (char*)malloc(15 * sizeof(char));
}

int main()
{
	Stu stu; size_t sum = 0;
	StuInit(&stu);
	scanf("%s", stu.ID);
	scanf("%s%zd", stu.name, &stu.age);
	scanf("%zd%zd%zd%zd%zd%zd", &stu.Math, &stu.English, &stu.CL, &stu.Engineer, &stu.Phy, &stu.Phy);
	if (stu.Math >= 60)
		sum += 4;
	if (stu.English >= 60)
		sum += 3;
	if (stu.CL >= 60)
		sum += 4;
	if (stu.Engineer >= 60)
		sum += 3;
	if (stu.Phy >= 60)
		sum += 3;
	if (stu.Inf >= 60)
		sum += 3;
	printf("%s %s %zd\n", stu.ID, stu.name, stu.age);
	printf("%zd", sum);
	return 0;
}